library(readr)
Houses <- read_csv("C:/Users/Shehroz Jawad Khan/Desktop/LEI Internship/Task6/Houses.csv")
## 
## -- Column specification --------------------------------------------------------
## cols(
##   Date_Time = col_datetime(format = ""),
##   House14 = col_double(),
##   House15 = col_double(),
##   House18 = col_double(),
##   House2 = col_double(),
##   House21 = col_double(),
##   House26 = col_double(),
##   House39 = col_double(),
##   House4 = col_double(),
##   House9 = col_double()
## )

#This analysis is performed on House2

House_2 = Houses[,c(1,5)]
House_2$hour = as.POSIXlt(House_2$Date_Time)$hour
library(plotly)
## Loading required package: ggplot2
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
ggplotly(ggplot(House_2)+geom_boxplot(aes(x = hour, y = House2))+labs(x="Houses", y = "Usage [kW]")+theme(axis.text.x = element_text(angle = 45))+scale_x_continuous(limits= c(0,23), breaks=c(0:23)))
## Warning: Continuous x aesthetic -- did you forget aes(group=...)?

#This analysis is performed on House9

House_9 = Houses[,c(1,10)]
House_9$hour = as.POSIXlt(House_9$Date_Time)$hour
library(plotly)
ggplotly(ggplot(House_9)+geom_boxplot(aes(x = hour, y = House9))+labs(x="Houses", y = "Usage [kW]")+theme(axis.text.x = element_text(angle = 45))+scale_x_continuous(limits= c(0,23), breaks=c(0:23)))
## Warning: Continuous x aesthetic -- did you forget aes(group=...)?

#This analysis is performed for House14

House_14 = Houses[,c(1,2)]
House_14$hour = as.POSIXlt(House_14$Date_Time)$hour
library(plotly)
ggplotly(ggplot(House_14)+geom_boxplot(aes(x = hour, y = House14))+labs(x="Houses", y = "Usage [kW]")+theme(axis.text.x = element_text(angle = 45))+scale_x_continuous(limits= c(0,23), breaks=c(0:23)))
## Warning: Continuous x aesthetic -- did you forget aes(group=...)?

#This analysis is performed on House15

House_15 = Houses[,c(1,3)]
House_15$hour = as.POSIXlt(House_15$Date_Time)$hour
library(plotly)
ggplotly(ggplot(House_15)+geom_boxplot(aes(x = hour, y = House15))+labs(x="Houses", y = "Usage [kW]")+theme(axis.text.x = element_text(angle = 45))+scale_x_continuous(limits= c(0,23), breaks=c(0:23)))
## Warning: Continuous x aesthetic -- did you forget aes(group=...)?

#This analysis is performed on House18

House_18 = Houses[,c(1,4)]
House_18$hour = as.POSIXlt(House_18$Date_Time)$hour
library(plotly)
ggplotly(ggplot(House_18)+geom_boxplot(aes(x = hour, y = House18))+labs(x="Houses", y = "Usage [kW]")+theme(axis.text.x = element_text(angle = 45))+scale_x_continuous(limits= c(0,23), breaks=c(0:23)))
## Warning: Continuous x aesthetic -- did you forget aes(group=...)?

#This analysis is performed on House21

House_21 = Houses[,c(1,6)]
House_21$hour = as.POSIXlt(House_21$Date_Time)$hour
library(plotly)
ggplotly(ggplot(House_21)+geom_boxplot(aes(x = hour, y = House21))+labs(x="Houses", y = "Usage [kW]")+theme(axis.text.x = element_text(angle = 45))+scale_x_continuous(limits= c(0,23), breaks=c(0:23)))
## Warning: Continuous x aesthetic -- did you forget aes(group=...)?

#This analysis is performed on House26

House_26 = Houses[,c(1,7)]
House_26$hour = as.POSIXlt(House_26$Date_Time)$hour
library(plotly)
ggplotly(ggplot(House_26)+geom_boxplot(aes(x = hour, y = House26))+labs(x="Houses", y = "Usage [kW]")+theme(axis.text.x = element_text(angle = 45))+scale_x_continuous(limits= c(0,23), breaks=c(0:23)))
## Warning: Continuous x aesthetic -- did you forget aes(group=...)?

#This analysis is performed on House39

House_39 = Houses[,c(1,8)]
House_39$hour = as.POSIXlt(House_39$Date_Time)$hour
library(plotly)
ggplotly(ggplot(House_39)+geom_boxplot(aes(x = hour, y = House39))+labs(x="Houses", y = "Usage [kW]")+theme(axis.text.x = element_text(angle = 45))+scale_x_continuous(limits= c(0,23), breaks=c(0:23)))
## Warning: Continuous x aesthetic -- did you forget aes(group=...)?